import React from 'react';
import ReactDOM from 'react-dom';
import Main from './Main';
import configureStore from '../stores/configureStore'
import { Provider } from 'react-redux'
import { DevTools, DebugPanel, LogMonitor } from 'redux-devtools/lib/react';


// Render the main component into the dom
//ReactDOM.render(<App />, document.getElementById('app'));


const store = configureStore()

// class App extends React.Component {
//   render() {
//     return (
//       <div>
//         <Provider store={store}>
//           <Main />
//         </Provider>
//       </div>
//     );
//   }
// }

class App extends React.Component {
  render() {
    return (
      <div>
        <Provider store={store}>
          <Main />
        </Provider>
        <DebugPanel top right bottom>
          <DevTools store={store}
                    monitor={LogMonitor}
                    visibleOnLoad={true} />
        </DebugPanel>
      </div>
    );
  }
}

ReactDOM.render(
  <App />,
  document.getElementById('app')
);
